<%
  nav_list = [
      {url: admin_index_path, icon: 'dashboard', text: '网站数据'},
      {url: admin_users_path, icon: 'user', text: '用户管理'},
      {url: admin_exams_path, icon: 'pencil', text: '考试管理'},
      {url: admin_videos_path, icon: 'film', text: '视频管理'},
      {url: 'http://localhost:3000/courses/new', icon: 'file-word-o', text: '课件管理'},
  ]
%>

  <div class="list-group side-nav-list" data-spy="affix" data-offset-top="125">
    <% nav_list.each_with_index do |item, no| %>
        <%= content_tag :a, href: item[:url], class: "list-group-item #{ 'active' if no.to_s == yield(:index) }" do -%>
            <%= content_tag :i, '', class: "fa fa-#{item[:icon]} fa-fw" %>
            <%= content_tag :span, "&nbsp;#{item[:text]}".html_safe %>
        <% end -%>
    <% end %>
  </div>